Skip to content

Update docs and semantics of become key#4905

Open
happz wants to merge 7 commits into
mainfrom
become-and-sudo
Open

Update docs and semantics of become key#4905
happz wants to merge 7 commits into
mainfrom
become-and-sudo

Conversation

@happz
Copy link
Copy Markdown
Contributor

@happz happz commented May 19, 2026

Instead of promising all scripts and tests would be running with sudo, it now states that user-provided scripts and tests would be invoked with superuser privileges. This makes the intent clearer, and gives us easier job: add sudo only when not already a superuser.

Pull Request Checklist

  • implement the feature

@happz happz added this to planning May 19, 2026
@happz happz added step | provision Stuff related to the provision step code | no functional change "No Functional Change" intended. Patch should not change tmt's behavior in any way. labels May 19, 2026
@github-project-automation github-project-automation Bot moved this to backlog in planning May 19, 2026
@happz happz added the ci | full test Pull request is ready for the full test execution label May 19, 2026
@happz happz moved this from backlog to review in planning May 19, 2026
Comment thread tmt/guest/__init__.py Outdated
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the handling of elevated privileges by replacing hardcoded 'sudo' commands with 'guest.facts.sudo_prefix' and updating the documentation for the '--become' option. Feedback includes using 'PHASE.parent.name' in filename templates to avoid potential AttributeErrors and ensuring environment variables are preserved when using 'sudo_prefix' in shell scripts.

Comment thread tmt/steps/__init__.py Outdated
Comment thread tmt/steps/prepare/shell.py
@happz happz changed the title Update docs and semantics of behave key Update docs and semantics of become key May 19, 2026
@happz happz force-pushed the become-and-sudo branch from 09d6e4a to 3e45993 Compare May 19, 2026 18:55
Comment thread tmt/guest/__init__.py Outdated
Comment thread tmt/steps/__init__.py Outdated
Comment thread tmt/guest/__init__.py Outdated
Comment thread tmt/guest/__init__.py
@happz happz self-assigned this May 21, 2026
happz added 4 commits May 25, 2026 09:02
Instead of promising all scripts and tests would be running with `sudo`,
it now states that user-provided scripts and tests would be invoked with
superuser privileges. This makes the intent clearer, and gives us easier
job: add `sudo` only when not already a superuser.
@happz happz force-pushed the become-and-sudo branch from b6aece8 to 0ed50eb Compare May 25, 2026 07:28
Comment thread tmt/steps/prepare/shell.py
@happz happz added the status | blocking other work An important pull request, blocking other pull requests or issues label May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci | full test Pull request is ready for the full test execution code | no functional change "No Functional Change" intended. Patch should not change tmt's behavior in any way. status | blocking other work An important pull request, blocking other pull requests or issues step | provision Stuff related to the provision step

Projects

Status: review

Development

Successfully merging this pull request may close these issues.

2 participants